package com.aizuda.boot.modules.business.contract.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.Date;

/**
 * 审批节点连接实体类
 *
 * @Author sangyirong
 * @Version 1.0
 * @Date 2025/5/20 13:36
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName("workflow_edge")
public class WorkflowEdgeEntity {

    @TableId(value = "id", type = IdType.AUTO)
    @Schema(description = "连接ID")
    private Integer id;

    @Schema(description = "所属审批流ID")
    private Integer workflowId;

    @Schema(description = "起始节点ID")
    private Integer sourceNodeId;

    @Schema(description = "目标节点ID")
    private Integer targetNodeId;

    @Schema(description = "条件表达式（用于条件分支）")
    private String conditionExpression;

    @Schema(description = "是否是分支路径")
    private Boolean isBranchPath;

    @Schema(description = "分支路径顺序（用于顺序分支）")
    private Integer branchOrder;

    @Schema(description = "创建时间")
    private Date createdAt;

    @Schema(description = "更新时间")
    private Date updatedAt;

    @Schema(description = "删除标识（0：否[默认]，1：是）")
    @TableLogic
    private Boolean isDeleted;
} 